
import * as data from "../../api/data";

var dayjs = require('dayjs');

Page({
    data: {
        dataType:"DAY",
        countDate:"",
        fundSite:[]
    },
    onLoad( options ){
        let countDate = decodeURIComponent(options.countDate)
        this.setData({
            dataType:options.dataType,
            countDate:countDate
        })
        this.get_data_list();
    },
    async get_data_list(){
        let fundSite = await data.getRankForFundSite({
            dataType:this.data.dataType,
            countDate:this.data.countDate,
            limitNum:100000
        });
        this.setData({
            fundSite:fundSite
        })

    },
    change_header_data(e){
        this.setData({
            dataType:e.detail.dataType,
            countDate:e.detail.countDate
        })
        this.get_data_list();
    }
})


